<div th:fragment="bendanweirenyuan">
    <div id="editModal" style="" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true" data-keyboard="false">
        <div class="modal-dialog modal-md" style="width:1000px;" id="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">&times;</button>
                    <h4 class="modal-title" id="myModalLabel"></h4>
                </div>
                <div class="modal-body" style="overflow: auto;" id="myModalBody">
                    <form id="form-user-edit" class="form-horizontal">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label is-required">登录账号</label>
                                    <div class="col-sm-8">
                                        <input v-model="editItem.loginname"  placeholder="请输入登录账号" class="form-control" type="text" maxlength="30" required>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label is-required">登录密码</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <input v-model="editItem.password" name="password"  placeholder="请输入登录密码" class="form-control" type="password" th:value="${@config.getKey('sys.user.initPassword')}" required>
                                            <span class="input-group-addon" title="登录密码,鼠标按下显示密码"
                                                  onmousedown="$('#password').attr('type','text')"
                                                  onmouseup="$('#password').attr('type','password')"><i class="fa fa-key"></i></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label is-required">用户名称</label>
                                    <div class="col-sm-8">
                                        <input v-model="editItem.username" name="username" placeholder="请输入用户名称" class="form-control" type="text" maxlength="30" required>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label ">角色</label>
                                    <div class="col-sm-8">
                                        <input disabled class="form-control" value="普通管理员">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label ">所属部门</label>
                                    <div class="col-sm-8">
                                        <input v-model="editItem.suoshubumen" name="suoshubumen" placeholder="请输入所属部门" class="form-control" type="text" >
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label ">办公电话</label>
                                    <div class="col-sm-8">
                                        <input v-model="editItem.bangongdianhua" name="bangongdianhua" placeholder="请输入办公电话" class="form-control" type="text">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">手机</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <input v-model="editItem.phonenumber"  placeholder="请输入手机号码" class="form-control" type="text" >
                                            <span class="input-group-addon"><i class="fa fa-mobile"></i></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">邮箱</label>
                                    <div class="col-sm-8">
                                        <div class="input-group">
                                            <input v-model="editItem.email" class="form-control email" type="text"  placeholder="请输入邮箱">
                                            <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label class="col-xs-2 control-label">备注</label>
                                    <div class="col-xs-10">
                                        <textarea v-model="editItem.remark" name="remark" maxlength="500" class="form-control" rows="3"></textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" v-if="editflag=='1'" @click="add">保存</button>
                    <button type="button" class="btn btn-warning" v-if="editflag=='2'" @click="edit">保存</button>
                </div>

            </div>
        </div>
    </div>
</div>